package com.net;

import android.content.Context;

import com.interfaces.NovaCallback;
import com.net.callback.Callback;
import com.substation.utils.SPUtils;

import java.util.Map;

/**
 * Created by admin on 2018/5/18.
 */

public class UserNet extends BaseNet {

    public static void login(Context context,String username,String password, NovaCallback c){
        Map<String,Object> map=getParams(context);
        map.put("username",username);
        map.put("password",password);
        map.put("type","1");
        SPUtils.put(context,"username",username);
        SPUtils.put(context,"password",password);
        getNovateOfDialog(context,"正在登录...").rxPost(Contants.login,map,new Callback(1,c,d));
    }

}
